<?php
/**
 * This is users/login template file. 
 *
 * @copyright     Copyright 2008-2010, LilCake.net
 * @link          http://lilcake.net LilCake.net
 * @package       lil
 * @subpackage    lil.views.users
 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
 */
	$user_fields = Configure::read('Lil.authFields');
	
	$user_login = array(
		'title_for_layout' => __d('lil', 'Login'),
		'form' => array(
			'pre' => '<div class="form">',
			'post' => '</div>',
			'lines' => array(
				'form_start' => array(
					'class' => $this->LilForm,
					'method' => 'create',
					'parameters' => array(
						Configure::read('Lil.authModel'),
						array(
							'url' => array(
								'plugin'     => 'lil',
								'controller' => 'users',
								'action'     => 'login',
								'admin'      => false
							)
						)
					)
				),
				'username' => array(
					'class' => $this->LilForm,
					'method' => 'input',
					'parameters' => array(
						$user_fields['username'],
						array(
							'label' => __d('lil', 'Username') . ':',
							'type'  => 'text'
						)
					)
				),
				'password' => array(
					'class' => $this->LilForm,
					'method' => 'input',
					'parameters' => array(
						$user_fields['password'],
						array(
							'label' => __d('lil', 'Password') . ':',
							'type'  => 'password'
						)
					)
				),
				'remember_me' => array(
					'class' => $this->LilForm,
					'method' => 'input',
					'parameters' => array(
						'remember_me',
						array(
							'type'  => 'checkbox',
							'label' => __d('lil', 'Remember me on this computer'),
						)
					)
				),
				'submit' => array(
					'class' => $this->LilForm,
					'method' => 'submit',
					'parameters' => array(__d('lil', 'OK'))
				),
				'form_end' => array(
					'class' => $this->LilForm,
					'method' => 'end',
					'parameters' => array()
				),
			)
		)
	);
	
	App::uses('LilPluginRegistry', 'Lil.Lil'); $registry = LilPluginRegistry::getInstance();
	$user_login = $registry->callPluginHandlers($this, 'form_login_user', $user_login);
	
	$this->Lil->form($user_login);